From a810e3beffaf16683aedcb6e22279779139d93ee Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 1 Jul 2005 05:53:53 +0000 Subject: [PATCH] Copy placer data when in waypt_dupe. --- waypt.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/waypt.c b/waypt.c index ee8b43355..87731cd66 100644 --- a/waypt.c +++ b/waypt.c @@ -36,6 +36,9 @@ waypt_init(void) waypoint * waypt_dupe(const waypoint *wpt) { + /* + * This and waypt_free should be closely synced. + */ waypoint * tmp; tmp = waypt_new(); memcpy(tmp, wpt, sizeof(waypoint)); @@ -60,6 +63,10 @@ waypt_dupe(const waypoint *wpt) tmp->gc_data.desc_long.utfstring = xstrdup(tmp->gc_data.desc_long.utfstring); } + if (wpt->gc_data.placer) { + tmp->gc_data.placer = xstrdup(wpt->gc_data.placer); + } + /* * It's important that this duplicated waypoint not appear * on the master Q. @@ -249,6 +256,9 @@ find_waypt_by_name(const char *name) void waypt_free( waypoint *wpt ) { + /* + * This and waypt_dupe should be closely synced. + */ if (wpt->shortname) { xfree(wpt->shortname); } -- 2.30.2